package javacode.chapter04;

import java.util.Scanner;

public class Example4_4 {
    public static void main(String[] args) {
        //多重else if，判断分数对应的等级
        Scanner scanner = new Scanner(System.in);
        System.out.print("输入一个分数（0-5）：");
        int score = scanner.nextInt();

        if (score==5){
            System.out.println("A");
        }else if (score==4){
            System.out.println("B");
        }else if (score==3){
            System.out.println("C");
        }else if (score==2){
            System.out.println("D");
        }else if (score==1 || score==0){
            System.out.println("E");
        }else {
            System.out.println("非法的输入成绩！");
        }
    }
}
